import {defineConfig} from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path';

import ElementPlus from 'unplugin-element-plus/vite'
// https://vitejs.dev/config/
export default defineConfig({
    plugins: [
        vue(),
        ElementPlus(),
    ],
    resolve: {
        alias: {
            '@': path.resolve('src')
        }
    },
    server: {
        proxy: {
            '/dev-api': {
                target: 'http://127.0.0.1:9678',
                changeOrigin: true,
                rewrite: (path) => path.replace(/^\/dev-api/, ''),
            },

        },
    },
    css:{
        preprocessorOptions: {
            scss: {
                additionalData: '@import "@/styles/variables.scss";',
                javascriptEnabled: true
            }
        }
    }
})
